package code.c06;

/**
 * @author thinkpad - 83start
 * @version v1.0
 * @create 2022/10/6 12:07
 * @package code.c06
 * @description 文件说明
 */

public class BallPen extends Pencil implements Eraser {
    public BallPen(String type) {
        super(type);
    }

    @Override
    public void eraser(String s) {
        System.out.println("用圆珠笔擦除：" + s);;
    }

    @Override
    public void write(String s) {
        System.out.println("用圆珠笔写：" + s);
    }

    public static void main(String[] args) {
        BallPen ballPen = new BallPen("黑色");
        ballPen.write("hello world");
        ballPen.eraser("hello world");

        Pencil pencil = new BallPen("黑色");
        pencil.write("hello world");
        pencil.eraser("hello world");
    }
}
